package com.piece.blog.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@ApiModel(value = "考试题目模型")
public class TrainingQuestionDTO implements Serializable {

    @ApiModelProperty(value = "题目ID")
    private Long questionId;

    @ApiModelProperty(value = "题目类型：0：单选、1：多选、2：判断、3：填空、4：主观")
    private String type;

    @ApiModelProperty(value = "选项类型：0：文字、1：图片、2：音频")
    private String optionType;

    @ApiModelProperty(value = "题目名称")
    private String content;

    @ApiModelProperty(value = "题目解析")
    private String analysis;

    @ApiModelProperty(value = "题目答案")
    private String answer;

    @ApiModelProperty(value = "题目难度")
    private Long difficulty;

    @ApiModelProperty(value = "题目分值")
    private Long score;

    @ApiModelProperty(value = "题目标签")
    private Long tagId;

    @ApiModelProperty(value = "题目选项")
    private List<TrainingQuestionOptionDTO> options;

    @ApiModelProperty(value = "创建人ID")
    private Long createBy;

    @ApiModelProperty(value = "创建时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "是否已回答")
    private Boolean answered;

    @ApiModelProperty(value = "是否回答正确")
    private Boolean isCorrect;
}
